<!--主页-->
<div class="main" ng-controller="mainCtrl as vm">
    <div ui-view class="child-route"></div>

    <div class="footer">
        <div class="box" ui-sref="main.home">
            <div ng-class="{true: 'home-active',false:'home-inactive'}[state.includes('main.home')]">
                <img ng-if="!state.includes('main.home')" src="/img/main/home_inactive.png" alt="">
                <img ng-if="state.includes('main.home')" src="/img/main/home_active.png" alt="">
            </div>
            <p class="name" ng-class="{true: 'active'}[state.includes('main.home')]">首页</p>
        </div>


        <div class="box" data-ng-click="vm.loseWeight()">
            <div class="scoreList">
                <img ng-if="!state.includes('main.loseWeight')" src="/img/main/rank_inactive.png" alt="">
                <img ng-if="state.includes('main.loseWeight')" src="/img/main/rank_active.png" alt="">
            </div>
            <p class="name" ng-class="{true: 'active'}[state.includes('main.loseWeight')]">排行榜</p>
        </div>
        <div class="box" data-ng-click="vm.personal()">
            <div ng-class="{true: 'personalCenter-active',false:'personalCenter-inactive'}[state.includes('main.personal')]">
                <img ng-if="!state.includes('main.personal')" src="/img/main/personal_inactive.png" alt="">
                <img ng-if="state.includes('main.personal')" src="/img/main/personal_active.png" alt="">
            </div>
            <p class="name" ng-class="{true:'active'}[state.includes('main.personal')]">我的</p>
        </div>
    </div>
</div>
